package com.ruoyi.health.report.api;

import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.common.core.web.page.TableDataInfo;
import com.ruoyi.customer.api.domain.CustomerVo;
import com.ruoyi.customer.api.domain.ZkxcUser;
import com.ruoyi.customer.api.domain.ZkxcUserDTO;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * @author ChenYF
 * @date 2025-08-29 15:29
 */
@Component
public class RemoteSysConfigService implements FallbackFactory<IRemoteSysConfigService> {
    @Override
    public IRemoteSysConfigService create(Throwable cause) {
        return new IRemoteSysConfigService() {
            @Override
            public R<String> getConfigKey(String configKey) {
                // 返回默认值或错误处理
                return R.fail("调用配置服务失败:" + cause.getMessage());
            }

            @Override
            public TableDataInfo getUserList(CustomerVo vo) {
                return new TableDataInfo();
            }

            @Override
            public TableDataInfo getZkxcUserList(ZkxcUserDTO dto) {
                return new TableDataInfo();
            }

            @Override
            public AjaxResult updateZkxcUser(ZkxcUser zkxcUser) {
                return AjaxResult.error();
            }

            @Override
            public AjaxResult selectZkxcUserById(Long id) {
                return AjaxResult.error();
            }
        };
    }
}
